home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagn_r.zip / PRINTING.SWG / 0034_PrintScreen for Text Mode.pas < prev    next >
Pascal/Delphi Source File  |  1994-02-15  |  815b  |  32 lines

  1. Unit PrntScrn;     (* PrintScreen Unit for regular text modes *)
  2.  
  3. (*--*)  Interface  (*--*)
  4.  
  5. Procedure PrintScreen;
  6.  
  7. (*--*)  Implementation  (*--*)
  8.  
  9. Uses Dos,Crt,Printer;
  10.  
  11. Procedure PrintScreen;
  12. Var
  13.   line : string[80];
  14.   x,y : integer;
  15.   Ms : Registers;
  16.  
  17. Begin
  18.   Ms.Ax := $10 shl 8 + $1a;       (* Read the current Page state *)
  19.   Intr($10,Ms);
  20.   For y := 1 to 25 do Begin       (* Do lines 1 to 25 *)
  21.     Line := '';
  22.     For x := 1 to 80 do Begin     (* and columns 1 to 80 *)
  23.       Gotoxy(x,y);                (* Move cursor *)
  24.       Ms.Ax := $8 shl 8;          (* Read character at cursor *)
  25.       Intr($10,Ms);
  26.       Line := Line + Chr(Lo(Ms.Ax));   (* Add to total line *)
  27.     End;
  28.     Writeln(lst,Line);            (* Write to printer *)
  29.   End;
  30. End;
  31.  
  32. End.  (* PrntScrn UNIT *)